$OpenBSD: patch-src_widgets_styles_qgtkstyle_p_cpp,v 1.1.1.1 2016/12/25 14:13:11 zhuk Exp $
--- src/widgets/styles/qgtkstyle_p.cpp.orig	Sun Jul 10 14:03:19 2016
+++ src/widgets/styles/qgtkstyle_p.cpp	Sun Jul 10 14:05:58 2016
@@ -328,7 +328,11 @@ void QGtkStylePrivate::resolveGtk() const
 {
 #ifndef QT_NO_LIBRARY
     // enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0
+# ifdef Q_OS_OPENBSD
+    QLibrary libgtk(QLS("gtk-x11-2.0"));
+# else
     QLibrary libgtk(QLS("gtk-x11-2.0"), 0, 0);
+# endif
 
     gtk_init = (Ptr_gtk_init)libgtk.resolve("gtk_init");
     gtk_window_new = (Ptr_gtk_window_new)libgtk.resolve("gtk_window_new");
@@ -426,8 +430,13 @@ void QGtkStylePrivate::resolveGtk() const
     pango_font_description_get_family = (Ptr_pango_font_description_get_family)libgtk.resolve("pango_font_description_get_family");
     pango_font_description_get_style = (Ptr_pango_font_description_get_style)libgtk.resolve("pango_font_description_get_style");
 
+# ifdef Q_OS_OPENBSD
+    gnome_icon_lookup_sync = (Ptr_gnome_icon_lookup_sync)QLibrary::resolve(QLS("gnomeui-2"), "gnome_icon_lookup_sync");
+    gnome_vfs_init= (Ptr_gnome_vfs_init)QLibrary::resolve(QLS("gnomevfs-2"), "gnome_vfs_init");
+# else
     gnome_icon_lookup_sync = (Ptr_gnome_icon_lookup_sync)QLibrary::resolve(QLS("gnomeui-2"), 0, "gnome_icon_lookup_sync");
     gnome_vfs_init= (Ptr_gnome_vfs_init)QLibrary::resolve(QLS("gnomevfs-2"), 0, "gnome_vfs_init");
+# endif
 #endif // !QT_NO_LIBRARY
 }
 
@@ -597,9 +606,15 @@ static bool resolveGConf()
 {
 #ifndef QT_NO_LIBRARY
     if (!QGtkStylePrivate::gconf_client_get_default) {
+# ifdef Q_OS_OPENBSD
+        QGtkStylePrivate::gconf_client_get_default = (Ptr_gconf_client_get_default)QLibrary::resolve(QLS("gconf-2"), "gconf_client_get_default");
+        QGtkStylePrivate::gconf_client_get_string =  (Ptr_gconf_client_get_string)QLibrary::resolve(QLS("gconf-2"), "gconf_client_get_string");
+        QGtkStylePrivate::gconf_client_get_bool =  (Ptr_gconf_client_get_bool)QLibrary::resolve(QLS("gconf-2"), "gconf_client_get_bool");
+# else
         QGtkStylePrivate::gconf_client_get_default = (Ptr_gconf_client_get_default)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_default");
         QGtkStylePrivate::gconf_client_get_string =  (Ptr_gconf_client_get_string)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_string");
         QGtkStylePrivate::gconf_client_get_bool =  (Ptr_gconf_client_get_bool)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_bool");
+# endif
     }
 #endif // !QT_NO_LIBRARY
     return (QGtkStylePrivate::gconf_client_get_default !=0);
